using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public enum ENUM_Weapon
{
    Null = -1,
    Gun = 0,
    Sword = 1,
    shotgun = 2,
    Max
}
public class Job710FsmMgr : MonoBehaviour
{
    private Dictionary<ENUM_Weapon, Job710WeaponBase> weaponDict = new Dictionary<ENUM_Weapon, Job710WeaponBase>();

    Job710WeaponBase job710Weapon;
    // Start is called before the first frame update
    void Start()
    {

    }

    // Update is called once per frame
    void Update()
    {

    }
    public void AddWeapon(ENUM_Weapon type, Job710WeaponBase weapon)
    {
        if (!weaponDict.ContainsKey(type))
        {
            weaponDict.Add(type, weapon);
        }
    }
    public void SetWeapon(ENUM_Weapon type)
    {
        if (weaponDict.ContainsKey(type))
        {
            if (job710Weapon != null)
            {
                job710Weapon.OnExit();
            }
            job710Weapon = weaponDict[type];

            job710Weapon.OnEnter();
        }
    }
    public void Atk()
    {
        if (job710Weapon != null)
        {
            job710Weapon.Atk();
        }
    }
}
